package esmp.jtt808.command;

/**
 * Created by dave on 18-7-20 下午8:05.
 */
public enum Jtt808Cmd {
    setParam(0x8103),       // 设置参数
    ;

    private int code;       // 命令消息ID

    Jtt808Cmd(int code) {
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public static Jtt808Cmd of(int code) {
        for (Jtt808Cmd c : Jtt808Cmd.values()) {
            if (c.code == code) {
                return c;
            }
        }
        return null;
    }
}
